package cn.xd.core.ddd.manager;

import cn.xd.core.ddd.diff.EntityDiff;
import cn.xd.core.ddd.value.IdValue;

public interface AggregateManager<T, ID> {

    void attach(T aggregate);

    void attach(T aggregate, ID id);

    void detach(T aggregate);

    void detachById(ID id);

    T find(IdValue id);

    EntityDiff detectChanges(T aggregate);

    void merge(T aggregate);
}

